/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.googlecode.javalearningproject.VEK_ME.GUI;

import javax.microedition.lcdui.game.LayerManager;

/**
 *
 * @author Administrator
 */
public class UI_LayerManager extends LayerManager{
    
    private BackgroundLayer backgroundLayer;
    private POILayer pointOfInterestLayer;
    private int viewPosX = 0;
    private int viewPosY = 0;
    
    public UI_LayerManager(BackgroundLayer bl)
    {
        backgroundLayer = bl;
        
        addLayers();
    }
    
    private void addLayers()
    {
        append(backgroundLayer);
        //append(pointOfInterestLayer);
    }
    
    public int getViewPosX()
    {
        return viewPosX;
    }
    
    public int getViewPosY()
    {
        return viewPosY;
    }
    
    public void setViewPos(int x, int y, int width, int height)
    {
        viewPosX = x;
        viewPosY = y;
        setViewWindow(viewPosX, viewPosY, viewPosX + width, viewPosY + height);
        System.out.println("viewSize: " + viewPosX + "," + viewPosY + " to " + (viewPosX + width) + "," + (viewPosY + height));
    }
    
    

}
